A typical general purpose digital signal processor (DSP) includes a controller which decodes instructions, by controlling operations of a high speed data path, registers, and a memory address generator. Individual instructions are fetched to the controller, typically at the rate of one instruction per clock cycle (or slower), and the controller decodes each instruction and sends control signals to the data path, registers, and memory address generator to perform the actions required by the instruction. Through programmed combinations of instructions, any variety of data processing operations can be accomplished.
The high speed data path of a DSP typically includes a number of registers for storing data being processed, an arithmetic and logic unit (ALU) for performing logical (e.g., AND, OR, XOR) operations as well as arithmetic (addition, multiplication, division) operations, and a parallel-connected bit shifting unit for performing bit shifting and masking. The memory address generator, in response to the controller, generates memory addresses for retrieving data from a main memory for delivery to the DSP, or for storing data produced by the DSP. Often, the memory address generator must produce sequential addresses or addresses identifying equally spaced locations in memory, to achieve a desired pattern of information retrieval and storage.
Each DSP (or other microprocessor) is associated with a finite, well-defined set of instructions, which instructions are arranged into programs to operate the DSP. To provide an example, a typical DSP instruction identifies an operation to be performed by either the ALU or bit shifting unit, identifies source register(s) in the DSP containing values on which the operation is to be performed, and identifies destination register(s) where the results of the operation are to be stored. In some cases the instruction may incorporate binary data to be used as one operand for the instruction, in which case the binary data incorporated in the instruction is delivered to the data path and combined with data stored in the registers by the ALU or bit shifting unit.
A typical calculation might be performed as follows: The memory address generator obtains values from main memory for processing. Once retrieved, the ALU performs a numeric operation on the values, and the results are fed back into registers. The results in the registers are then fed into the bit shifting and masking unit during a next instruction cycle. Finally, the memory address generator causes the processed values to be stored back in the main memory.